// ParamsDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RGD.h"
#include "ParamsDlg.h"


// CParamsDlg dialog

IMPLEMENT_DYNAMIC(CParamsDlg, CDialog)

CParamsDlg::CParamsDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CParamsDlg::IDD, pParent)
	, m_minP(1000.0f)
	, m_maxP(100000.0f)
	, m_minT(5000.0f)
	, m_maxT(1000.0f)
	, m_gridSize(250)
	, m_cellSize(0.1f)
	, m_precision(1e-5f)
	, m_experimentTime(0.25)
	, m_minFreq(100)
	, m_maxFreq(100000)
	, m_numFreqs(3)
{

}

CParamsDlg::~CParamsDlg()
{
}

void CParamsDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_MINP, m_minP);
	DDV_MinMaxFloat(pDX, m_minP, 10.0f, 1e20f);

	DDX_Text(pDX, IDC_MAXP, m_maxP);
	DDV_MinMaxFloat(pDX, m_maxP, 10.0f, 1e20f);

	DDX_Text(pDX, IDC_MINT, m_minT);
	DDV_MinMaxFloat(pDX, m_minT, 10.0f, 1e20f);

	DDX_Text(pDX, IDC_MAXT, m_maxT);
	DDV_MinMaxFloat(pDX, m_maxT, 10.0f, 1e20f);

	DDX_Text(pDX, IDC_NUM_CELLS, m_gridSize);
	DDV_MinMaxInt(pDX, m_gridSize, 10, 1000000000);

	DDX_Text(pDX, IDC_CELL_SIZE, m_cellSize);
	DDV_MinMaxFloat(pDX, m_cellSize, 0.0000001f, 1000.0f);

	DDX_Text(pDX, IDC_PRECISION, m_precision);
	DDV_MinMaxFloat(pDX, m_precision, FLT_MIN, 1.0f);

	DDX_Text(pDX, IDC_TIME, m_experimentTime);
	DDV_MinMaxFloat(pDX, m_experimentTime, 0.0000001f, 1000.0f);

	DDX_Text(pDX, IDC_MIN_FREQ, m_minFreq);
	DDV_MinMaxFloat(pDX, m_minFreq, 0.0000001f, 1e20f);

	DDX_Text(pDX, IDC_MAX_FREQ, m_maxFreq);
	DDV_MinMaxFloat(pDX, m_maxFreq, 0.0000001f, 1e20f);

	DDX_Text(pDX, IDC_NUM_LEVELS, m_numFreqs);
	DDV_MinMaxInt(pDX, m_numFreqs, 3, 1000);
}


BEGIN_MESSAGE_MAP(CParamsDlg, CDialog)
END_MESSAGE_MAP()


// CParamsDlg message handlers
